<template>
  <div workbench-ask-list class="wrap-list">
    <router-link tag="div" class="index-list-box" v-for="(items,i) in dataList" :key="i" :to="{name:'taskDetail',query:{id:items.id,uid:items.uid,sour:items.sour}}">
     <div style="margin-top:20px;position:relative;" class="box-inner">
        <div class="item">
        <div class="cell">
          <img :src="items.img_url1?items.img_url1:'/static/img/person2.jpg'" alt="">
          <div class="text">
            <h3>{{items.name}}</h3>
            <span>{{items.type}}</span>
          </div>
        </div>
        <i>{{items.showprice}}元</i>
      </div>
      <div class="center">
        <div>
          <!-- <p>{{items.name}}</p> -->
          <p>要求：{{items.describe}}</p>
          <p>任务周期：{{items.time}}</p>
        </div>

      </div>

      <!-- <slot name="bottom"></slot> -->
     </div>
    </router-link>

  </div>
</template>
<style scoped lang="less" src="./style.less"></style>
<script src="./script.js"></script>

<script>
export default {
  data() {
    return {
      dataList: []
    };
  },
  created() {
    this.init();

  },
  mounted() {},
  methods: {

    init() {
      this.axios
        .get("/api/job/finish", {
          params: { uid: JSON.parse(sessionStorage.getItem("user")).uid }
        })
        .then(res => {
          this.dataList = res.data.data;
          console.log(res.data.data);

        });
    }
  }
};
</script>
<style lang="less" scoped>
.wrap-list{
  background: #F8FAFE;
  margin-bottom: 60px;
}
.index-list-box{
  background: #fff;
  display: block;
  margin-bottom: 20px;
  margin-top: 20px;

}
</style>

